package cn.edu.huas.shopping.dao;

import cn.edu.huas.shopping.exception.DaoException;
import cn.edu.huas.shopping.pojo.IndexProduct;
import cn.edu.huas.shopping.pojo.OrderItem;
import cn.edu.huas.shopping.pojo.Product;

import java.util.List;
import java.util.Map;

public interface ProductDao {
    /*根据id查询商品*/
    public Product queryById(Integer id)throws DaoException;
    /*查询最新的首页商品*/
    public List<IndexProduct> queryIndexProduct(String news)throws DaoException;
    /*查询订单中的所有商品*/
    public OrderItem queryOrderItem(Integer id)throws DaoException;
    /*根据类别编号统计商品的总数*/
    public int queryCountByCid(Integer cid)throws DaoException;
    /*根据类别来进行分页查询*/
    public List<Product> queryProductsByCid(Integer cid,Integer beginIndex,Integer size);
}
